package Stream;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Collection5 {
    public static void main(String[] args) {
        List<String> list=new ArrayList<>();
        list.add("apple");
        list.add("banana");
        list.add("orange");
        list.add("grape");
        //批量增加元素
        Collections.addAll(list, "mango", "kiwi", "pear");
        //打乱顺序
        Collections.shuffle(list);
        
    }
}
